<template>
  <div style='text-align:center;'
       id="jktjCoverTemplate"
       width=710>
    <table cellpadding="0"
           v-loading="loading"
           cellspacing="0"
           style="border-collapse:separate;
     border-spacing:0px 10px;border:1px solid black;text-align:center;line-height:38px;width:100% "
           id="programme">
      <tr style='text-align:center'>
        <td width=710
            valign=top
            style='text-align:center'>
          <p class=MsoNormal
             align=right
             style='text-align:right;margin-right:10px'>
            <b style='mso-bidi-font-weight:normal'>
              <span style='font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体'>编号:</span>
            </b>
            <span lang=EN-US>{{form.dnbh}}
            </span>
          </p>
          <p align=center
             style='text-align:center;padding-top:80px'>
            <span style='font-size:32.0pt;'>{{form.jddw}}</span>
          </p>
          <p align=center
             style='text-align:center;padding-top:50px'>
            <span style='font-size:32.0pt;'>健&nbsp; 康&nbsp; 体&nbsp; 检 &nbsp;报 &nbsp;告</span>
          </p>
          <p align=center
             style="text-align:center;padding-top:100px;">
            <img src="/img/jktjfm.jpg"
                 width=250>
          </p>
          <p align=center
             style="padding-left:20%;padding-top:200px;line-height:40px">
            <span class="span">
              <span class='span_label'>姓 &nbsp; 名</span>
              <span class="unline"
                    style="width:400px;text-align:center">{{form.name}}</span>
            </span>
          </p>
          <p align=center
             style="padding-left:20%;line-height:40px">
            <span class="span">
              <span class='span_label'>年 &nbsp; 龄</span>
              <span class="unline"
                    style="width:400px;text-align:center">{{form.age}}</span>
            </span>
          </p>
          <p align=center
             style="padding-left:20%;line-height:40px">
            <span class="span">
              <span class='span_label'>联系电话</span>
              <span class="unline"
                    style="width:400px;text-align:center">{{form.lxdh}}</span>
            </span>
          </p>
          <p align=center
             style="padding-left:20%;line-height:40px">
            <span class="span">
              <span class='span_label'>现 住 址</span>
              <span class="unline"
                    style="width:400px;text-align:center">{{form.jkdnxzz}}</span>
            </span>
          </p>
          <p align=center
             style="padding-left:20%;line-height:40px">
            <span class="span">
              <span class='span_label'>体检单位</span>
              <span class="unline"
                    style="width:400px;text-align:center">{{form.jddw}}</span>
            </span>
          </p>
          <p align=center
             style="padding-left:20%;line-height:40px">
            <span class="span">
              <span class='span_label'>体检日期</span>
              <span class="unline"
                    style="width:400px;text-align:center">{{jkdn.jdrq}}</span>
            </span>
          </p>
          <br /><br />
        </td>
      </tr>

    </table>
  </div>
</template>
<script>
import '@/styles/report.scss'
import { getObj } from '@/api/cust/health/jkdn'
import { getStore } from '@/util/store.js'
import { getAge } from '@/filters/'
export default {
  name: 'coverTemplate',
  data () {
    return {
      loading: false,
      id: null,
      grjbxxid: null,
      jkdn: '',
      age: '',
      form: {
        id: null,
        name: '',
        jkdnxzz: '',
        jkdnhjdz: '',
        lxdh: '',
        xzjdmc: '',
        cwhmc: '',
        jddw: '',
        jdr: '',
        zeys: '',
        jdrq: ''
      }
    }
  },
  created () {
    this.jkdn = getStore({ name: 'jkdn' })
    this.age = getAge(this.form.sfzhm)
    this.grjbxxid = this.$route.query.grjbxxid
    this.id = this.$route.query.id
    if (!this.validatenull(this.id)) {
      this.getData()
    }
  },
  mounted () { },
  methods: {
    getData () {
      getObj(this.id).then(res => {
        this.form = res.data
      })
    },
    breaks () { }
  },
  computed: {}
}
</script>

  